home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-21 | 3.0 KB | 93 lines | [TEXT/ttxt] |
- --<<<-
- -- Filename:
- -- LOADME.SX
-
- -- Other Files Required:
- -- JAILBIRD.SX, MEDIA.SX
-
- -- Purpose:
- -- Demonstrates a simple working document
-
- -- Specialized Classes:
- -- None
-
- -- Instructions to User:
- -- This is the script which will load all scripts needed to create the document.
- -- To create the titlecontainer, run the loadme.sx script.
- --
- -- When the jailbird.sxt title runs a window will appear with the title page.
- -- Click any where in this page to go to the next page. Subsequent pages will
- -- contain forward and backward buttons for traversing the document.
-
- -- Author:
- -- Kim Swix
- ------------------------------------------------------------------------
- -- *******************************************************************
- -- JailBirds - a small sample document
- -- Document is composed of two layouts and 4 pages. One layout is the title page.
- -- The other the page for mugshots.
- -- All bitmaps are represented as persistentProxys so that they can be purged
- -- from memory when traversing from page to page. Although, memory is not
- -- an issue in this example; it will be for "live" apps.
- --
- -- Directions for Use:
- -- 1. To create the title container, load in the script loadme.sx. This script will
- -- take care of loading in additional files.
- --
- -- Running the titleContainer:
- -- 1. Either double click on the title container or choose Open from the file menu.
- -- 2. Once the titleContainer is created, a title page will appear. Click any
- -- where in the title page to go to the next page. Subsequent pages will
- -- have arrows to move forwards and backwards.
- --- ********************************************************************
-
-
- -- ********************************************************************
- -- Define the titleContainer and the document module.
- -- ********************************************************************
- module docModule
- uses ScriptX
- end
-
- in module docModule
- global docCont := new titleContainer dir:theScriptDir path:"jailbird.sxt" \
- targetcollection:(new hashtable)
-
- global doc, MyDocumentClass, MyWindowClass
-
- fileIn theScriptDir name:"docprint.sx"
- fileIn theScriptDir name:"media.sx"
- fileIn theScriptDir name:"jailbird.sx"
-
-
- -- This example causes the document to be built during startup. For more lengthy apps., it
- -- would be better to have the document already built and in the window. Save the window
- -- to the titleContainer. That way on startup, the window is restored with doc already
- -- in it.
- function startMugs ->
- (
- local win := new MyWindowClass boundary:(new rect x2:300 y2:300) name:"JailBirds" title:thetitlecontainer
-
- win.y := 40
- doc := makeDocument()
- append win doc
- forward doc
- show win
- return win
- )
-
-
- docCont.startupAction := (tc ->
- if (not isdefined Printer) do (process (new loader) "loadable/printing")
-
- -- Enable the print menu item
- enableitem theTitleContainer.systemMenuBar @print
-
- foreach tc load undefined
- startMugs()
- )
-
- add docCont "startmugs" startmugs
- close docCont
- -->>>
-